<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css按钮</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    body{
        /* 弹性布局 元素居中 */
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background-color: #000;
    }
    a{
        /* 定位固定位置 */
        position: relative;
        top: 0;
        left: 0;
        color:#fff;
        text-decoration: none;
        width: 400px;
        height: 100px;
        line-height: 100px;
        text-align: center;
        text-transform: uppercase;
        border-radius: 50px;
        font-size: 24px;
        /* 背景渐变 */
        background: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #09a8f4);
        /* 背景缩放 */
        background-size: 400%;
        z-index: 1;
    }
    a::before{
        /* 发光效果  模糊背景 */
        content: "";
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        border-radius: 50px;
        background: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #09a8f4);
        background-size: 400%;
        z-index: -1;
        /* 滤镜 */
        filter: blur(20px);
    }
    a:hover{
        animation: sun 8s infinite;
    }
    a:hover::before{
        animation: sun 8s infinite;
    }
    @keyframes sun{
        100%{
            background-position: -400% 0;
        }
    }



</style>
<body>
    <a href="javascript:;">sunbutton</a>
</body>
</html>